Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 8 pull requests #120251

Merged
merged 21 commits into from
Jan 23, 2024
Merged

Rollup of 8 pull requests #120251

merged 21 commits into from
Jan 23, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

compiler-errors and others added 21 commits January 19, 2024 21:28
bjorn3 says:
> On errors we don't finalize the incr comp cache, but non-fatal diagnostics are cached afaik.
Otherwise we would have to replay the query in question, which we may not be able to do if the query
key is not reconstructible from the dep node fingerprint.

So we must track these flags to avoid replaying incorrect diagnostics.
`RegionHighlightMode::force_print_trimmed_def_path` can call
`trimmed_def_paths` even when `tcx.sess.opts.trimmed_def_paths` is
false. Based on the `force` in the method name, it seems this is
deliberate, so I have removed the assertion.

Fixes rust-lang#120035.
To expressly warn against the kind of proc macro implementation that was
broken in rust-lang#119875.
Our "true negative" detection assumes that if at least one std handle is a Windows console then no other handle will be a msys2 tty pipe. This turns out to be a faulty assumption in the case of  `/dev/ptmx`.
…ing, r=WaffleLapkin"

This reverts commit 6d2b84b, reversing
changes made to 73bc121.
Fix tty detection for msys2's `/dev/ptmx`

Our "true negative" detection assumes that if at least one std handle is a Windows console then no other handle will be a msys2 tty pipe. This turns out to be a faulty assumption in the case of redirection to  `/dev/ptmx` in an msys2 shell. Maybe this is an msys2 bug but in any case we should try to make it work.

An alternative to this would be to replace the "true negative" detection with an attempt to detect if we're in an msys environment (e.g. by sniffing environment variables) but that seems like it'd be flaky too.

Fixes rust-lang#119658
…mpiler-errors

never_patterns: Count `!` bindings as diverging

A binding that is a never pattern is not reachable, hence counts as diverging code. This allows in particular `fn foo(!: Void) -> SomeType {}` to typecheck.

r? ``@compiler-errors``
…ce-resolve-for-coroutines, r=oli-obk

Consolidate logic around resolving built-in coroutine trait impls

Deduplicates a lot of code. Requires defining a new lang item for `Coroutine::resume` for consistency, but it seems not harmful at worst, and potentially later useful at best.

r? oli-obk
Track `verbose` and `verbose_internals`

`verbose_internals` has been UNTRACKED since it was introduced. When i added `verbose` in rust-lang#119129 i made it UNTRACKED as well.

``@bjorn3`` says: rust-lang#119286 (comment)
> On errors we don't finalize the incr comp cache, but non-fatal diagnostics are cached afaik.
Otherwise we would have to replay the query in question, which we may not be able to do if the query key is not reconstructible from the dep node fingerprint.

So we must track these flags to avoid replaying incorrect diagnostics.

r? incremental
…assertion, r=compiler-errors

Fix a `trimmed_def_paths` assertion failure.

`RegionHighlightMode::force_print_trimmed_def_path` can call `trimmed_def_paths` even when `tcx.sess.opts.trimmed_def_paths` is false. Based on the `force` in the method name, it seems this is deliberate, so I have removed the assertion.

Fixes rust-lang#120035.

r? `@compiler-errors`
…cs, r=petrochenkov

Document `Token{Stream,Tree}::Display` more thoroughly.

To expressly warn against the kind of proc macro implementation that was broken in rust-lang#119875.

r? ``@petrochenkov``
…abilization, r=lcnr

Revert stabilization of trait_upcasting feature

Reverts rust-lang#118133

This reverts commit 6d2b84b, reversing changes made to 73bc121.

The feature has a soundness bug:

* rust-lang#120222

It is unclear to me whether we'll actually want to destabilize, but I thought it was still prudent to open the PR for easy destabilization once we get there.
@rustbot rustbot added O-hermit Operating System: Hermit O-SGX Target: SGX O-solid Operating System: SOLID O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 22, 2024
@rustbot rustbot added T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jan 22, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Jan 22, 2024

📌 Commit a787232 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 22, 2024
@bors
Copy link
Contributor

bors commented Jan 22, 2024

⌛ Testing commit a787232 with merge d6b151f...

@bors
Copy link
Contributor

bors commented Jan 23, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing d6b151f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 23, 2024
@bors bors merged commit d6b151f into rust-lang:master Jan 23, 2024
12 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Jan 23, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#119664 Fix tty detection for msys2's /dev/ptmx 2d15bb9c95ba5ca53dadbb5ea71de56c2d0db296 (link)
#120104 never_patterns: Count ! bindings as diverging e151b477eba17f12f464fc4cdbde5000d06a83c4 (link)
#120109 Move cmath into sys 24e97e71429834b7f08b73060c6f1d8027057f53 (link)
#120143 Consolidate logic around resolving built-in coroutine trait… f851ab4951692d2d7bb0241a32d3c433d7bbdaf7 (link)
#120159 Track verbose and verbose_internals 0f63a8864823a22180f848e67e4da7d4852a954a (link)
#120216 Fix a trimmed_def_paths assertion failure. c13f519e1218bba8fea1d7196bfb06fc7f6c3075 (link)
#120220 Document Token{Stream,Tree}::Display more thoroughly. 88e887721fe57c82879f3a6ee79d82532ab3488a (link)
#120233 Revert stabilization of trait_upcasting feature ab8a3b932baa0a64f2635142b2aa73930f6598bb (link)

previous master: d5fd099729

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d6b151f): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
6.3% [3.8%, 11.2%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.5% [-4.5%, -4.5%] 1
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 662.155s -> 663.509s (0.20%)
Artifact size: 308.34 MiB -> 308.32 MiB (-0.00%)

DianQK pushed a commit to DianQK/rust that referenced this pull request Jan 23, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#119664 (Fix tty detection for msys2's `/dev/ptmx`)
 - rust-lang#120104 (never_patterns: Count `!` bindings as diverging)
 - rust-lang#120109 (Move cmath into `sys`)
 - rust-lang#120143 (Consolidate logic around resolving built-in coroutine trait impls)
 - rust-lang#120159 (Track `verbose` and `verbose_internals`)
 - rust-lang#120216 (Fix a `trimmed_def_paths` assertion failure.)
 - rust-lang#120220 (Document `Token{Stream,Tree}::Display` more thoroughly.)
 - rust-lang#120233 (Revert stabilization of trait_upcasting feature)

r? `@ghost`
`@rustbot` modify labels: rollup
@matthiaskrgr matthiaskrgr deleted the rollup-gttrw68 branch March 16, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. O-hermit Operating System: Hermit O-SGX Target: SGX O-solid Operating System: SOLID O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.